<template>
  <div class="table-page-search-wrapper">
    <a-form layout="inline">
      <a-row :gutter="48">
        <a-col :md="8" :sm="24">
          <a-form-item label="状态">
            <a-select placeholder="请选择" default-value="0" v-model="queryParam.status">
              <a-select-option :value="-1">全部</a-select-option>
              <a-select-option :value="1">启用</a-select-option>
              <a-select-option :value="0">停用</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
        <a-col :md="8" :sm="12">
          <span class="table-page-search-submitButtons">
            <a-button type="primary" icon="search" @click="$emit('tableQuery', queryParam)">查询</a-button>
            <a-button style="margin-left: 8px" icon="redo" @click="handlReset()">重置</a-button>
          </span>
        </a-col>
        <a-col :md="8" :sm="12">
          <span class="table-page-search-submitButtons" style="text-align: right">
            <a-button type="primary" icon="plus" style="margin-left: 8px" @click="$emit('add')">新增</a-button>
          </span>
        </a-col>
      </a-row>
    </a-form>
  </div>
</template>

<script>

export default {
  name: 'CommonHeader',
  data () {
    return {
      queryParam: { 'status': -1 }
    }
  },
  created () {},
  methods: {
    handlReset () {
      this.queryParam = { 'status': -1 }
    }
  }
}
</script>
